<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<button type="button" id="back">后退</button>
		<button type="button" id="go">前进</button>
		<script type="text/javascript">
			document.querySelector('#back').addEventListener('click',function(){
				history.back();//退一步
			});
			document.querySelector('#go').addEventListener('click',function(){
				history.go(30);//前进
			})
		</script>
	</body>
</html>